/*
 * @Author: 清酒吖
 * @Date: 2022-01-23 13:26:34
 * @Email:  
 * @LastEditors:  
 * @LastEditTime: 2022-01-25 15:59:09
 * @Description: 
 * @version: x 1.0
 */

import request from '@/utils/request'

// @ 分页+条件查询商品品牌
export function findCatAndTemplate(data) {
    return request({
        url: `/cat/findCatAndTemp`,
        method: 'post',
        data
    })

}   

// @ 条件查询商品品牌
export function findCatList(catParent) {
    return request({
        url: `/cat/findCats/${catParent}`,
        method: 'post',
    })

}

// @ 添加商品分类
export function addCat(data){
    return request({
        url:`/cat/insertCat`,
        method: 'post',
        data
    })
}

// @ 根据id查询商品分类
export function selectCatById(id) {
    return request({
        url: `/cat/findCatById/${id}`,
        method: 'post',
    })
}

// @ 修改商品分类
export function modifyCat(data) {
    return request({
        url: `/cat/updateCat`,
        method: 'put',
        data
    })
}

// @ 级联查询商品分类
export function catcCscader() {
    return request({
        url: `/cat/findCatCascader`,
        method: 'post',
    })
}
